1. Field of the Invention
The present invention relates to a technique for handling a collision between virtual objects.
2. Description of the Related Art
The movement or behavior of a three-dimensional (3D) virtual object is managed by a physical engine in, for example, a game console. When there is a collision between the virtual objects, the process of applying repulsive force is essential in the physical engine. The process of applying the repulsive force demands that the velocity of the virtual object needs to be updated. Meanwhile, the processes to be handled by the physical engine are, in some cases, performed by plural processors in parallel, in order to increase the processing speed. It is now assumed that a virtual object A and a virtual object B are colliding with each other, and the virtual object B and a virtual object C are colliding with each other. In this situation, it is also assumed that any given processor updates the velocity of the object B in accordance with the collision process between the objects A and B, and at the same time, a different processor updates the velocity of the object B in accordance with the collision process between the objects B and C. If this happens, the process of updating the velocity of the object B by any given processor conflicts with the process of updating the same by a different processor, thereby leading to the possibility that inconsistent data is written into the velocity of the object B. In general, an exclusive control using semaphore or the like is performed to avoid the above-mentioned conflict.
It should be apparent that the exclusive control achieves some satisfactory results from the perspective of avoiding the conflict. However, when there are a number of virtual objects to be managed by the physical engine, a considerable amount of calculation is required for each of the virtual objects in order to perform the process of exclusive control. This might cause a situation in which the effect produced by parallel processing is not applicable in an efficient manner. Such a situation will be a big problem in real-time processing, in particular, such as a collision process performed by the physical engine.